{% raw %}
All result for the 8a.1 benchmark specification.
from IPython.display import HTML
HTML('''<script>
code_show=true;
function code_toggle() {
if (code_show){
$('div.input').hide();
$('div.prompt').hide();
} else {
$('div.input').show();
$('div.prompt').show();
}
code_show = !code_show
}
$( document ).ready(code_toggle);
</script>
<form action="javascript:code_toggle()"><input type="submit" value="Code Toggle"></form>''')
#from IPython.display import HTML, display
#from time import sleep
#display(HTML("""
#<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
#"""))
#sleep(0.1)
from IPython.display import HTML, display
from time import sleep
display(HTML("""
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script>
"""))
sleep(0.1)
from pfhub.main import line_plot, levelset_plot, get_table_data, plot_order_of_accuracy, get_result_data
#import itables.interactive
from itables import init_notebook_mode
init_notebook_mode(all_interactive=False)
line_plot(
data_name='free_energy_1',
benchmark_id='8a.1',
layout=dict(
x='time (s)',
y='Free Energy',
title="Free Energy, <i>r</i><sub>0</sub>=0.99<i>r</i><sup>*</sup>"
)
)
line_plot(
data_name='solid_fraction_1',
benchmark_id='8a.1',
layout=dict(
x='time (s)',
y='Solid Fraction',
title="Solid Fraction, <i>r</i><sub>0</sub>=0.99<i>r</i><sup>*</sup>"
)
)
line_plot(
data_name='free_energy_2',
benchmark_id='8a.1',
layout=dict(
x='time (s)',
y='Free Energy',
title="Free Energy, <i>r</i><sub>0</sub>=<i>r</i><sup>*</sup>"
)
)
line_plot(
data_name='solid_fraction_2',
benchmark_id='8a.1',
layout=dict(
x='time (s)',
y='Solid Fraction',
title="Solid Fraction, , <i>r</i><sub>0</sub>=<i>r</i><sup>*</sup>"
)
)
line_plot(
data_name='free_energy_3',
benchmark_id='8a.1',
layout=dict(
x='time (s)',
y='Free Energy',
title="Free Energy, <i>r</i><sub>0</sub>=1.01<i>r</i><sup>*</sup>"
)
)
line_plot(
data_name='solid_fraction_3',
benchmark_id='8a.1',
layout=dict(
x='time (s)',
y='Solid Fraction',
title="Solid Fraction, <i>r</i><sub>0</sub>=1.01<i>r</i><sup>*</sup>"
)
)
#PYTEST_VALIDATE_IGNORE_OUTPUT
data = get_result_data(['phase_field_1'], ['8a.1'], ['x', 'y', 'z'])
levelset_plot(
data,
layout=dict(
levelset=0.5,
range=[-10, 10],
title="Solid / Liquid Boundary at t=200, <i>r</i><sub>0</sub>=0.99<i>r</i><sup>*</sup>"
),
mask_func=lambda df: (0.1 < df.z) & (df.z < 0.9),
columns=('x', 'y', 'z')
)
data = get_result_data(['phase_field_2'], ['8a.1'], ['x', 'y', 'z'])
levelset_plot(
data,
layout=dict(
levelset=0.5,
range=[-10, 10],
title="Solid / Liquid Boundary at t=200, <i>r</i><sub>0</sub>=<i>r</i><sup>*</sup>"
),
mask_func=lambda df: (0.1 < df.z) & (df.z < 0.9)
)
data = get_result_data(['phase_field_3'], ['8a.1'], ['x', 'y', 'z'])
levelset_plot(
data,
layout=dict(
levelset=0.5,
range=[-10, 10],
title="Solid / Liquid Boundary at t=200, <i>r</i><sub>0</sub>=1.01<i>r</i><sup>*</sup>"
),
mask_func=lambda df: (0.1 < df.z) & (df.z < 0.9)
)
Table of 1a.1 benchmark result uploads
## Currently switching off interactive tables as these are not converted to HTML properly.
## This might improve when jupyter-nbcovert is updated to a later version.
init_notebook_mode(all_interactive=False)
get_table_data('8a.1')